Micron Document
Fox's Git Mirrors

Node / rns-mirrors / Reticulum-Go.git / files / pkg / sandbox / exec_rlimit_linux.go

Displaying Raw • Download

pkg/sandbox/exec_rlimit_linux.go 633735d797cc5f5d48cb2e22e8fd7cd743930daf (633735d7) Text, 412 B

// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2024-2026 Quad4.io

//go:build linux

package sandbox

import "golang.org/x/sys/unix"

const execChildNproc = 32

func applyChildRlimits(pid int) {
if pid <= 0 {
return
}
_ = unix.Prlimit(pid, unix.RLIMIT_CORE, &unix.Rlimit{Cur: 0, Max: 0}, nil)
_ = unix.Prlimit(pid, unix.RLIMIT_NPROC, &unix.Rlimit{Cur: execChildNproc, Max: execChildNproc}, nil)
}

Served by rngit 1.5.2 - Generated in 0.02s